package org.guegan.util.dircompare.util;

import java.util.List;

import org.hibernate.Query;
import org.hibernate.Session;

public class SessionUtil {
	private Session session;

	public void setSession(Session session) {
		this.session = session;
	}

	public Session getSession() {
		return session;
	}
	
	@SuppressWarnings("unchecked")
	public <T> List<T> list(Query query) {
		List<T> ret = (List<T>) query.list();
		return ret;
	}
	
}
